home *** CD-ROM | disk | FTP | other *** search
/ Complete Linux / Complete Linux.iso / docs / system / mail / transpor / ifmail23.z / ifmail23 / ifmail / ifgate / lastmtime.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-09-04  |  314 b   |  23 lines

  1. #include <stdio.h>
  2. #include <sys/types.h>
  3. #include <sys/stat.h>
  4.  
  5. int main(argc,argv)
  6. int argc;
  7. char *argv[];
  8. {
  9.     struct stat st;
  10.     time_t t=0L;
  11.     int i=1;
  12.  
  13.     while (argv[i])
  14.     {
  15.         if (stat(argv[i],&st) == 0)
  16.             if (st.st_mtime > t) t=st.st_mtime;
  17.         i++;
  18.     }
  19.     if (t == 0L) time(&t);
  20.     printf("%s",ctime(&t));
  21.     return 0;
  22. }
  23.